﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern10装修模式.Base
{
    public abstract class Decorater : Person
    {
        protected Person Person { get; private set; } = null;
        public Decorater(Person person)
        {
            Person = person;
        }

        public override void Invoke()
        {
            if(Person != null)
            {
                Person.Invoke();
            }
        }
    }
}
